﻿namespace Mirus.Corelib.Text.Console
{
    public class Utility
    {
        private Console owner;

        public Utility(Console c)
        {
            owner = c;
        }

        public void PrintOK()
        {
            owner.ChangeColor(System.ConsoleColor.Green, 1);
            owner.Print("[OK]\n");
            owner.ChangeColor(System.ConsoleColor.White, 1);
        }

        public void PrintFail()
        {
            owner.ChangeColor(System.ConsoleColor.Red, 1);
            owner.Print("[FAIL]\n");
            owner.ChangeColor(System.ConsoleColor.White, 1);
        }

        public void PrintWarning()
        {
            owner.ChangeColor(System.ConsoleColor.Yellow, 1);
            owner.Print("[WARNING]\n");
            owner.ChangeColor(System.ConsoleColor.White, 1);
        }

        public string ReturnPaddedString(string inp, int desiredLength)
        {
            string outp = inp;
            for (int i = 0; i < desiredLength - inp.Length; i++)
            {
                outp += " ";
            }
            return outp;
        }
    }
}
